export default (axios) => {
    return ({
        getVerifyStatus: getVerifyStatus(axios),
        getStepsRecord: getStepsRecord(axios),
        getVaccineList: getVaccineList(axios),
        sendStep1: sendStep1(axios),
        sendStep2: sendStep2(axios),
        sendStep3: sendStep3(axios)
    });
};

const getVerifyStatus = (axios) => (id) => {
    return axios.get(`/verify/get_state/${id}`);
}

const getStepsRecord = (axios) => (id) => {
    return axios.get(`/verify/get/${id}`);
}

const getVaccineList = (axios) => (id) => {
    return axios.get(`/verify/get_vcc/${id}`);
}

const sendStep1 = (axios) => (data={}) => {
    return axios.post(`/verify/step1`, data);
}

const sendStep2 = (axios) => (data={}) => {
    return axios.post(`/verify/step2`, data);
}

const sendStep3 = (axios) => (data={}) => {
    return axios.post(`/verify/step3`, data, { headers: {'Content-Type': 'multipart/form-data' } });
}